// document.addEventListener("DOMContentLoaded", function() {
//     const columns = document.querySelectorAll('.learning-column, .entertainment-column');

//     columns.forEach(column => {
//         column.classList.add('collapsed');
//     });
// });

function showContent(contentType) {
    // 隐藏所有内容区域
    document.getElementById('chat-window').style.display = 'none';
    document.getElementById('learn1-window').style.display = 'none';
    document.getElementById('learn2-window').style.display = 'none';
    document.getElementById('entertainment1-window').style.display = 'none';
    document.getElementById('entertainment2-window').style.display = 'none';
    document.getElementById('learn3-window').style.display = 'none';

    // 显示选择的内容
    if (contentType === 'chat') {
        document.getElementById('chat-window').style.display = 'block';
    }else if (contentType === 'learning1') {
        document.getElementById('learn1-window').style.display = 'block';
    }else if (contentType === 'learning2') {
        document.getElementById('learn2-window').style.display = 'block';
    }else if (contentType === 'learning3') {
        document.getElementById('learn3-window').style.display = 'block';
    }else if (contentType === 'entertainment1') {
        document.getElementById('entertainment1-window').style.display = 'block';
    } else if (contentType === 'entertainment2') {
        document.getElementById('entertainment2-window').style.display = 'block';
    }
}

const columnHeaders = document.querySelectorAll('.chat-column .column-header, .learning-column .column-header, .entertainment-column .column-header');

// 为每个分栏头部添加点击事件
// columnHeaders.forEach(header => {
//     header.addEventListener('click', (event) => {
//         const currentColumn = header.closest('.chat-column, .learning-column, .entertainment-column');

//         columnHeaders.forEach(column => {
//             const parentColumn = column.closest('.chat-column, .learning-column, .entertainment-column');
//             if (parentColumn !== currentColumn) {
//                 parentColumn.classList.add('collapsed');
//             }
//         });

//         currentColumn.classList.toggle('collapsed');
//     });
// });